var ExceptionDetail = function () {
  var template = /* html */ `
    <div class="exception-detail">
      <el-form label-width="auto" size="medium">
        <el-form-item label="异常类型">
          <span>{{exception.typeText}}</span>
        </el-form-item>
        <el-form-item label="异常描述">
          <span>{{exception.exceptionType}}</span>
        </el-form-item>
        <el-form-item label="异常图片">
          <imgs-upload readonly v-model="exception.imgUrls" :img-width="100" :img-height="100"></imgs-upload>
        </el-form-item>
        <el-form-item label="提交人">
          <span>{{exception.createUser}}</span>
        </el-form-item>
        <el-form-item label="提交日期">
          <span>{{moment(exception.createTime).format('YYYY-MM-DD')}}</span>
        </el-form-item>
        <el-form-item :label="exception.status===1?'解决人':'负责人'">
          <span>{{exception.solveUser}}</span>
        </el-form-item>
        <el-form-item v-if="exception.status===0&&exception.notifyUser!==exception.solveUserId" label="转交人">
          <span>{{exception.notifyUserName}}</span>
        </el-form-item>
        <el-form-item label="状态">
          <span>{{i18n.getMsg('productMgr.exceptionTable.status.'+exception.status)}}</span>
        </el-form-item>

        <template v-if="exception.status===1">
        <el-form-item label="解决方式">
          <span>{{exception.solveMethod}}</span>
        </el-form-item>
        <el-form-item label="解决日期">
          <span>{{moment(exception.solveTime).format('YYYY-MM-DD')}}</span>
        </el-form-item>
        </template>

        <el-form-item label="解决复期">
          <span v-if="exception.answerDate!==null">{{moment(exception.answerDate).format('YYYY-MM-DD')}}</span>
        </el-form-item>

        <el-form-item label="转交状态" v-if="exception.isDeliver">
          <span>{{i18n.getMsg('productMgr.exceptionTable.notifyStatus.'+exception.notifyStatus)}}</span>
        </el-form-item>
      </el-form>
    </div>
  `;

  return {
    props: {
      exception: {
        type: Object,
        required: true
      }
    },

    data: function () {
      return {};
    },

    components: {
      ImgsUpload: ImgsUpload
    },

    template: template
  };
}();
